package MTRequest;

import MTClient.MTConstant;
import MTClient.MessageCentre;

public class MTRequestFactory {
	public static MTRequest CreateRequest( int aRequestID, MessageCentre aMsgCenter )
	{
		MTRequest request = null;
		switch( aRequestID ){
			case MTConstant.MT_REQID_REGISTER:{
				request = new MTClientRegisterRequest( aMsgCenter );
				break;
			}
			case MTConstant.MT_REQID_SYNCHRONIZE_CONTACT_LIST:{
				request = new MTClientSynContactList( aMsgCenter );
				break;
			}
			case MTConstant.MT_REQID_CREATE_EVENT:{
				request = new MTClientCreateEvent( aMsgCenter );
				break;
			}
			case MTConstant.MT_REQID_SYNCHRONIZE_DATA_FROM_LOCAL_DB:{
				request = new MTClientSynDataFromLocalDB( aMsgCenter );
				break;
			}
			case MTConstant.MT_REQID_SYNCHRONIZE_DATA_FROM_SERVER:{
				request = new MTClientSynDataFromServerDB( aMsgCenter );
				break;
			}
			case MTConstant.MT_REQID_STOCK_TAKE_EVENT:{
				request = new MTClientStockTakeEvent( aMsgCenter );
				break;
			}
		}
		return request;
	}

}
